package com.api.shopapi.service;


import com.api.shopapi.entity.Business;
import com.api.shopapi.entity.YearData;
import com.api.shopapi.entity.dto.BusinessDTO;
import com.api.shopapi.entity.dto.BusinessDTO1;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface BusinessService {

    int insert(Business business);

    int deleteByBusinessCode(String businessCode);

    int updateByBusinessCode(Business business);

    Business getByBusinessCode(String businessCode);

    Business getByUserCode(String userCode);

    List<Business> getList();

    List<BusinessDTO> getListBusinessDTOByGovernmentCode(String governmentCode);


    PageInfo<Business> getPageInfo(int pageNum, int pageSize);

    PageInfo<BusinessDTO> getPageInfoBusinessDTO(int pageNum, int pageSize);

    PageInfo<BusinessDTO> getPageInfoBusinessDTOByGovernmentCode(int pageNum, int pageSize,String governmentCode);

    BusinessDTO1 businessOrderStatistics(String businessCode,String startTime,String endTime);

    PageInfo<BusinessDTO1> getPageForGov(int pageIndex,int pageSize,String governmentCode);

    YearData getBusinessYearData(String businessCode);

}
